home *** CD-ROM | disk | FTP | other *** search
- Path: ix.netcom.com!netnews
- From: a1s@ix.netcom.com (Andrew Snyder)
- Newsgroups: comp.lang.c
- Subject: Re: text file manipulation
- Date: Wed, 31 Jan 1996 17:04:44 GMT
- Organization: Netcom
- Message-ID: <4ent2e$81@ixnews3.ix.netcom.com>
- References: <4e6su7$6pu@paperboy.ids.net>
- NNTP-Posting-Host: ix-har6-16.ix.netcom.com
- X-NETCOM-Date: Wed Jan 31 6:07:10 AM PST 1996
- X-Newsreader: Forte Free Agent 1.0.82
-
- scarney@conan.ids.net (scarney) wrote:
-
-
- >Another stupid question...
-
- >I'm trying to write a little program to modify the /etc/passwd
- >file...I'm curious how you take a line in a text file (like passwd) and
- >change it. Does fwrite append, or if the file index is in the middle of
- >the file will it overwrite whatever is there (i.e., do what I want to do
- >with the file). If not, could you use the FILE pointer to change the data?
-
- >Thanks.
-
- >--Seth
-
- get the Linux code for the passwd program and look to see how it was
- done there.
- Andrew Snyder
- a1s@ix.netcom.com
- char disclaimer[] = {'\0'}; /* I'm on cash net */
-
-